<?php
/**
 * admin 入口程序
 *
 * @copyright Copyright (c) 2008 luohaili
 * @author harry 
 * @subpackage room
 * 
 */

/**
 * 后台管理配置文件
 */
$ConfigFileName ='app/config/admin.php';
/**
 * 数据库连接文件
 */
$dsnFilename = realpath(dirname(__FILE__)).'/data/db/dsn.php';
/**
 * 
 *网站路径
 *
 */
define('WEBAPP_DIR',realpath(dirname(__FILE__).'/app'));
/**
 * 系统路径
 *
 */
define('SYSTEM_DIR',dirname(__FILE__));
/**
 * 插件路径
 *
 */
define('LIB_DIR',realpath(dirname(__FILE__).'/lib'));
define('NO_LEGACY_FLEAPHP', true);
define('DEPLOY_MODE',true);
/**
 * 载入框架
 */
require('FLEA/FLEA.php');
/**
 * 载入路径
 */
FLEA::loadAppInf($ConfigFileName);
FLEA::loadAppInf($dsnFilename);
FLEA::import(WEBAPP_DIR);
FLEA::import(LIB_DIR);
FLEA::runMVC();
function AdminError404()
{
	echo 'error';
}
function AdminPermissions()
{
	echo 'no Premissions';
	//redirect($_SERVER['HTTP_REFERER']);
}